#ifndef HITBOXINCLUDED
#define HITBOXINCLUDED

#include "point.h"

class hitbox
{
protected:
	const point* position;
public:
	hitbox(const point* ancrage);

	void Setancre(const point* ancrage);
	virtual bool colpoint(double x,double y,double z)=0;
	bool const collision(const hitbox & h);
	virtual bool const collision(const hitboxRECT & OR)=0;
	virtual bool const collision(const hitboxCERCL & OR)=0;
};

class hitboxRECT: public hitbox
{
protected:
	int taillex;
	int tailley;
	int taillez;

public:
	hitboxRECT(point* ancrage,int taillex,int tailley,int taillez);
	bool colpoint(double x,double y,double z);
	bool const collision(const hitboxRECT & OR);
	bool const collision(const hitboxCERCL & OC);
};

class hitboxCERCL: public hitbox
{
protected:
	double rayon;
public:
	hitboxCERCL(point* ancrage,double rayon);
	bool colpoint(double x,double y,double z);
	bool const collision(const hitboxCERCL & OC);
	bool const collision(const hitboxRECT & OR);
};

/*inline bool operator==(const hitboxRECT& OR1,const hitboxRECT& OR2) { return OR1.collision(OR2); }
inline bool operator==(const hitboxCERCL & OC,const hitboxRECT & OR) {}
inline bool operator==(const hitboxRECT & OR,const hitboxCERCL & OC) {}
inline bool operator==(const hitboxCERCL & OC1,const hitboxCERCL & OC2) {return OC1.collision(OC2); }*/



#endif